const Timestamp = new Date().getTime()

module.exports = {
	publicPath: '',
	outputDir: 'target/dist/web',
	productionSourceMap: false,
	configureWebpack: {
    output: {
      filename: `js/[name].${Timestamp}.js`,
      chunkFilename: `js/[name].${Timestamp}.js`
    },
  },
	devServer: {
		proxy: {
			'/api': {
				target: 'http://localhost:18087/merliondr',
				ws: true,
				changeOrigin: true,
				pathRewrite: {
					'^/api':''
				}
			}
		}
	},
	css: { //main.js中引入antd.less后，不写这段会报错.bezierEasingMixin()
    loaderOptions: {
      less: {
				lessOptions: {
					modifyVars: {
						'primary-color': '#008c8c',
						'link-color': '#008c8c',
						'border-radius-base': '2px',
					},
					javascriptEnabled: true,
				}
      }
		},
		extract: {
			filename: `css/[name].${Timestamp}.css`,
			chunkFilename: `css/[name].${Timestamp}.css`
		}
	},

}